package pers.cz.service;

import pers.cz.model.Postgirl;
import pers.cz.model.PostgirlDtl;
import pers.cz.model.Role;
import pers.cz.model.SystemVarCfg;

import java.util.List;

public interface SystemConfigService {

    public List<Role> getAllRole();
    public Integer addRole(Role role);
    public Integer updateRole(Role role);
    public Integer deleteRole(Integer roleId);
    public Role getRoleById(Integer roleId);

    public List<Role> getRoleByParentId(Integer parentRoleId);

    List<Role> getParentRole();
    List<Integer> getAllMenuId(Integer roleId);

    public void addPower(Integer roleId, Integer menuId);
    public void deletePower(Integer roleId, Integer menuId);

    public List<PostgirlDtl> queryAllUserDtl();
    public List<PostgirlDtl> queryAllUserDtlByPage(Integer limit, Integer start);

    public Integer addUser(Postgirl postgirl);

    public Integer updateUser(Postgirl postgirl);

    public Integer deleteUser(Integer userId);

    public Integer resetPassword(Integer userId);

    public Integer getCount();

    public Integer updateLockedState(Integer userId, Integer locked);

    public Integer updateEnableState(Integer userId, Integer enable);

    public Integer getCurrentRoleByUserId(Integer userId);

    public PostgirlDtl getCurrentUserDtlByUserId(Integer userId);

    public List<SystemVarCfg> getSystemVarCfg(String varType);

    public Integer updateSystemVarCfg(SystemVarCfg systemVarCfg);
}
